﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows.Media.Media3D;

namespace Game3D
{
    [Serializable]
    public class GameShapeCenters
    {
        public static Point3D I = new Point3D(0, 0, 0);
        public static Point3D L = new Point3D(0, 0, 0);
        public static Point3D J = new Point3D(0, 0, 0);
        public static Point3D S = new Point3D(0, 0, 0);
        public static Point3D Z = new Point3D(1, 0, 0);
        public static Point3D O = new Point3D(0, 0, 0);
        public static Point3D T = new Point3D(1, 0, 0);
        public static Point3D Single = new Point3D(0, 0, 0);

        /// <summary>
        /// Resolves the centers of a given shape.
        /// </summary>
        /// <param name="shapeToResolve">The name of the shape what should be resolved.</param>
        /// <returns>A Point3D Object with the correct center.</returns>
        public static Point3D ResolveCenters(Shape shapeToResolve)
        {
            Point3D value;

            switch (shapeToResolve)
            {
                case Shape.J:
                    value = J;
                    break;
                case Shape.I:
                    value = I;
                    break;
                case Shape.L:
                    value = L;
                    break;
                case Shape.O:
                    value = O;
                    break;
                case Shape.T:
                    value = T;
                    break;
                case Shape.S:
                    value = S;
                    break;
                case Shape.Z:
                    value = Z;
                    break;
                default:
                    value = Single;
                    break;
            }

            return value;
        }
    }
}
